package com.woniuxy.common.api.enums;

import com.woniuxy.common.api.IErrorCode;
import lombok.Getter;

@Getter
public enum BusinessCode implements IErrorCode {

    ADD_SUCCESS(10000, "新增成功！"),
    ADD_FAIL(10001, "新增失败！"),
    MODIFY_SUCCESS(11000, "修改成功！"),
    MODIFY_FAIL(11001, "修改失败！"),
    REMOVE_SUCCESS(12000, "删除成功！"),
    REMOVE_FAIL(12001, "删除失败！"),
    LOGIN_FAIL(13001, "登录失败！用户名或密码错误！"),
    SESSION_TIMEOUT(13002, "session超时，请重新登录！"),
    ASSIGN_SUCCESS(15000, "分配成功！"),
    ASSIGN_FAIL(15001, "分配失败！"),
    ORDER_SUCCESS(16000, "排序成功！"),
    ORDER_FAIL(16001, "排序失败！");

    private Integer code;

    private String message;

    private BusinessCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
